# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Domains.V1.Model.LoadBalancerTarget do
  @moduledoc """
  The configuration for an individual load balancer to health check.

  ## Attributes

  *   `ipAddress` (*type:* `String.t`, *default:* `nil`) - The frontend IP address of the load balancer to health check.
  *   `ipProtocol` (*type:* `String.t`, *default:* `nil`) - The protocol of the load balancer to health check.
  *   `loadBalancerType` (*type:* `String.t`, *default:* `nil`) - The type of load balancer specified by this target. This value must match the configuration of the load balancer located at the LoadBalancerTarget's IP address, port, and region. Use the following: - *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - *regionalL7ilb*: for a regional internal Application Load Balancer. - *globalL7ilb*: for a global internal Application Load Balancer. 
  *   `networkUrl` (*type:* `String.t`, *default:* `nil`) - The fully qualified URL of the network that the load balancer is attached to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`.
  *   `port` (*type:* `String.t`, *default:* `nil`) - The configured port of the load balancer.
  *   `project` (*type:* `String.t`, *default:* `nil`) - The project ID in which the load balancer is located.
  *   `region` (*type:* `String.t`, *default:* `nil`) - The region in which the load balancer is located.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :ipAddress => String.t() | nil,
          :ipProtocol => String.t() | nil,
          :loadBalancerType => String.t() | nil,
          :networkUrl => String.t() | nil,
          :port => String.t() | nil,
          :project => String.t() | nil,
          :region => String.t() | nil
        }

  field(:ipAddress)
  field(:ipProtocol)
  field(:loadBalancerType)
  field(:networkUrl)
  field(:port)
  field(:project)
  field(:region)
end

defimpl Poison.Decoder, for: GoogleApi.Domains.V1.Model.LoadBalancerTarget do
  def decode(value, options) do
    GoogleApi.Domains.V1.Model.LoadBalancerTarget.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Domains.V1.Model.LoadBalancerTarget do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
